package com.zwj.design.behavior.strategy.duck.impl;

import com.zwj.design.behavior.strategy.behavior.impl.FlyWithWings;
import com.zwj.design.behavior.strategy.behavior.impl.Quack;
import com.zwj.design.behavior.strategy.duck.Duck;

/**
 * 绿头鸭
 *
 * @author 张文接
 * @version 1.0
 * @createTime 2024/3/14 22:18
 */
public class MallardDuck extends Duck {
    /**
     * 初始化操作，定义飞行种类与发声种类
     */
    public MallardDuck() {
        quackBehavior = new Quack();
        flyBehavior = new FlyWithWings();
    }

    /**
     * 展示
     */
    public void display(){
        System.err.println("我真的是一直绿头鸭。。。。。。。。。。。。。");
    }
}
